<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title></title>
  </head>
  <body>
    <div id="app">
      <btn-a></btn-a>
      <get-total></get-total>
    </div>
    <script src="./vue.js"></script>
    <script>
      const vm = new Vue({
        el: "#app",
        data: {},
        methods: {},
        components: {
          "btn-a": {
            template: `<h3>这是一个秘密，已做好决定{{msg}}</h3>`,
            data() {
              return {
                msg: "-我好烦啊-",
              };
            },
          },
          "get-total": {
            template: `<div><input type="text" v-model.number="num1">+        <input type="text" v-model.number="num2">=<span>{{num1+num2}}</span></div>`,
            data() {
              return {
                num1: "",
                num2: "",
              };
            },
          },
        },
      });
    </script>
  </body>
</html>
